package exception;

import java.io.FileNotFoundException;

/**
 * @author Huangjin
 * @version 1.0
 * describe:
 * @date 2023/3/9 17:09
 */
public class ThrowDemo {
    public static void main(String[] args) {
        Student zs = new Student();
        try {
            zs.setAge(200);
            zs.setName("");
            System.out.println(zs.getAge());
            System.out.println(zs.getName());
        } catch (IllegalAgeException e) {
            System.out.println("发生异常，处理了");
        }
    }
}
